<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>json</title>
	</head>
	<body>
		<h1>JSON对象创建</h1>
		<script>
			person={
				name:'jack',
				age : 20,
				addr:{
					homeAddr:'太原迎泽区',
					workAddr:'太原小店区'
				}
			};
			alert(person.addr.homeAddr);
			alert(person["age"]);
		    students=[
              {
              	name:'csm',
              	age:21
              },
              {
              	name:'qjp',
              	age:19
              }
		    ];
		    alert(students[0].age);
		    s={
              "sites": [
              { "name":"菜鸟教程" , "url":"www.runoob.com" }, 
              { "name":"google" , "url":"www.google.com" }, 
              { "name":"微博" , "url":"www.weibo.com" }
              ]
              }
		    alert(s.sites[0].url);
		</script>
	</body>
</html>
